import React from 'react';
import {TouchableWithoutFeedback, View, Text, Image} from 'react-native';

const Button = ({bodyStyle, textStyle, imgStyle, img, text = '', fun}) => {
  return (
    <TouchableWithoutFeedback onPress={fun}>
      <View style={bodyStyle}>
        {img ? <Image style={imgStyle} source={img} /> : null}
        {text ? <Text style={textStyle}>{text}</Text> : null}
      </View>
    </TouchableWithoutFeedback>
  );
};

export default Button;
